/**
 * 
 */
package com.mvc.utils;

/**
 * @author qingjie
 *
 */
public class HttpString {
	
	/**
	 * 判断是否为默认时间
	 * @param time
	 * @return
	 */
	public static boolean isNowTime(String time){
		String s = time.substring(0, 1);
		return "0".equals(s);
	}
	
	/**
	 * 判断测试时间是否大于现在时间
	 * @param nowTime 现在时间
	 * @param testTime 测试时间
	 * @return
	 * @throws Exception
	 */
	public static boolean timeSubtract(String nowTime,String testTime){
		long now = Long.parseLong(nowTime);
		long test = Long.parseLong(testTime);
		return now-test<0;
	}
	
	/**
	 * 判断血糖值的范围0.8~34
	 * @param bloodGlu 血糖值
	 * @return
	 */
	public static boolean isAccordBloodGlu(String bloodGlu){
		double glu = Double.parseDouble(bloodGlu);
		return glu>=0.8&&glu<=34;
	}

}
